<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>{&SITE_TITLE}</title>
	<link href="__PUBLIC__/admin/css/layout.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript">
		var ctrl = function(name){
			this.elements = document.getElementsByName('id[]');
			this.length = this.elements.length;
		}
		ctrl.prototype = {
			reverse:function(){
				for(i=0;i<this.length;i++){
					this.elements[i].checked= !this.elements[i].checked;
				}
			},
			all:function(){
				for(i=0;i<this.length;i++){
					this.elements[i].checked = true;
				}
			},
			unAll:function(){
				for(i=0;i<this.length;i++){
					this.elements[i].checked = false;
				}
			},
			toggle:function(obj){
				this[obj.checked ? 'all' : 'unAll']();
			},
			del:function(id){
				if(id==undefined){
					id = [];
					for(i=0;i<this.length;i++){
						this.elements[i].checked && id.push(this.elements[i].value);
					}
					id = id.join(',');
				}
				location.href = "__URL__/delnode/id/"+id;
			},
			edit:function(id){
				location.href = "__URL__/node/id/"+id;
			}
		}
		var c = null;
	</script>
    
	</head>
	<body>
		<div id="container">
			<table class="tableborder" width="100%">
				<tbody>
					<tr class="top">
						<td class="border"></td>
					</tr>
					<tr>
						<th class="header">tips</th>
					</tr>
					<tr>
						<td class="tips">
							<ul>
								<li>ThinkSnS系统后台权限配置 - 菜单管理</li>
							</ul>
						</td>
					</tr>
					<tr class="bottom">
						<td class="border" colspan="5">&nbsp;</td>
					</tr>
				</tbody>
			</table>
			<table class="tableborder" width="100%">
				<tbody>
					<tr class="top">
						<td class="border" colspan="7"></td>
					</tr>
					<tr>
						<th class="header" colspan="7">标题 <php>if($info){</php><a href="__APP__/Popedom/group">添加</a><php>}</php></th>
					</tr>
					<tr class="label">
						<th>编号</th>
						<th>组名</th>
						<th>前台显示</th>
						<th>类别</th>
						<th>图标</th>
						<th>描述</th>
						<th>操作</th>
					</tr>
<volist id="vo" name="list">
		<tr class="cell altbg2" style="height:30px;">
		<td >{$vo.id}</td>
		<td >{$vo.name}</td>
		<td >{$vo.showname}</td>
		<td >
		<switch name="vo.type">
		<case value="web">
			普通用户组
		</case>
		<case value="admin">
			后台管理员
		</case>
		</switch>
		</td>
		<td ><img src="__THEME__/images/icon/groupicon/{$vo.icon}"></td>
		<td >{$vo.description}</td>
		<td style="width:15%"><a href="__APP__/Popedom/group/groupid/{$vo.id}">编辑</a> <a href="__APP__/Popedom/delgroup/id/{$vo.id}">删除</a></td>
	</tr>
</volist>					
					<tr>
						<td class="footer" colspan="7">
							&nbsp;
						</td>
					</tr>
					<tr class="bottom">
						<td class="border" colspan="7">&nbsp;</td>
					</tr>
				</tbody>
			</table>
<php>if($info){</php>
			<table class="tableborder" width="100%">
			<form action="__URL__/addgroup" method="POST">
			<input type="hidden" name="groupid" value="{$info.id}" />
				<tbody>
					<tr class="top">
						<td class="border" colspan="2"></td>
					</tr>
					<tr>
						<th class="header" colspan="2">修改用户组</th>
					</tr>
					<tr class="label">
						<th>说明</th>
						<th>设置</th>
					</tr>
					
					<tr class="cell">
						<td class="altbg1">
							<b>用户组类别:</b>
							<br/>
							<span class="smalltxt">用户组类别</span>
						</td>
						<td class="altbg2"><input type="radio" name="type" value="web" <eq name="info.type" value="web">checked</eq> >普通用户组&nbsp;&nbsp;<input type="radio" name="type" value="admin" <eq name="info.type" value="admin">checked</eq> >后台管理员 </td>
					</tr>					
					
					<tr class="cell">
						<td class="altbg1">
							<b>用户组名:</b>
							<br/>
							<span class="smalltxt">用户组名</span>
						</td>
						<td class="altbg2"><input name="name" class="txt" value="{$info.name}"/> </td>
					</tr>
					
					<tr class="cell">
						<td class="altbg1">
							<b>前台显示名:</b>
							<br/>
							<span class="smalltxt">前台显示名</span>
						</td>
						<td class="altbg2"><input name="showname" class="txt" value="{$info.showname}"/> </td>
					</tr>					
													
					<tr class="cell">
						<td class="altbg1">
							<b>用户组图标:</b>
							<br/>
							<span class="smalltxt">用户组图标</span>
						</td>
						<td class="altbg2"><input name="icon" class="txt" value="{$info.icon}"/> <img src="__THEME__/images/icon/groupicon/{$info.icon}"></td>
					</tr>
					
					
					<tr class="cell">
						<td class="altbg1">
							<b>描述:</b>
							<br/>
							<span class="smalltxt">对节点的描述</span>
						</td>
						<td class="altbg2">
							<textarea cols="30" name="description" rows="5" >{$info.description}</textarea>
						</td>
					</tr>
					<tr>
						<td class="footer" colspan="2">
							<input type="submit" class="button" value="修改" />
						</td>
					</tr>
					<tr class="bottom">
						<td class="border" colspan="5">&nbsp;</td>
					</tr>
				</tbody>
			  </form>
			</table>
<php>}else{</php>
			<table class="tableborder" width="100%">
			<form action="__URL__/addgroup" method="POST">
				<tbody>
					<tr class="top">
						<td class="border" colspan="2"></td>
					</tr>
					<tr>
						<th class="header" colspan="2">添加用户组</th>
					</tr>
					<tr class="label">
						<th>说明</th>
						<th>设置</th>
					</tr>
						<tr class="cell">
						<td class="altbg1">
							<b>用户组类别:</b>
							<br/>
							<span class="smalltxt">用户组类别</span>
						</td>
						<td class="altbg2"><input type="radio" name="type" value="web" checked> 普通用户组&nbsp;&nbsp;<input type="radio" name="type" value="admin"  >后台管理员 </td>
					</tr>					
					
					<tr class="cell">
						<td class="altbg1">
							<b>用户组名:</b>
							<br/>
							<span class="smalltxt">用户组名</span>
						</td>
						<td class="altbg2"><input name="name" class="txt" "/> </td>
					</tr>
					
					<tr class="cell">
						<td class="altbg1">
							<b>前台显示名:</b>
							<br/>
							<span class="smalltxt">前台显示名</span>
						</td>
						<td class="altbg2"><input name="showname" class="txt"/> </td>
					</tr>					
													
					<tr class="cell">
						<td class="altbg1">
							<b>用户组图标:</b>
							<br/>
							<span class="smalltxt">用户组图标</span>
						</td>
						<td class="altbg2"><input name="icon" class="txt"/></td>
					</tr>				
	
					<tr class="cell">
						<td class="altbg1">
							<b>描述:</b>
							<br/>
							<span class="smalltxt">对节点的描述</span>
						</td>
						<td class="altbg2">
							<textarea cols="30" name="description" rows="5" ></textarea>
						</td>
					</tr>
					<tr>
						<td class="footer" colspan="2">
							<input type="submit" class="button" value="添加" />
						</td>
					</tr>
					<tr class="bottom">
						<td class="border" colspan="5">&nbsp;</td>
					</tr>
				</tbody>
			  </form>
			</table>
<php>}</php>

		</div>
		<script type="text/javascript">
			c = new ctrl('id[]');
		</script>
	</body>
</html>
